/**
 * 
 */
package com.ufida.ids.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hereway.core.dao.BaseHibernateDAO;
import com.ufida.ids.dao.IUserMappingDAO;
import com.ufida.ids.model.UserMappingModel;

/**
 * @author kevin
 *
 */

@Repository("userMappingDAO")
public class UserMappingDAOImpl extends BaseHibernateDAO<UserMappingModel, Long> implements IUserMappingDAO {

	@Override
	public UserMappingModel findByUserApp(Long staffId, Long appId) {
		List<UserMappingModel> list = super.find(" where staffId = " + staffId + " and appId = " + appId);
		if(list.size() != 0)
			return list.get(0);
		return null;
	}

}
